answers = [] as TreeSet
for (a in 2..100) {
    for (b in 2..100) {
        a = a as BigInteger
        b = b as BigInteger
        answers << a.pow(b)
    }
}
println answers.size()